#include <stdio.h>

void Print(char ch, int n);
int main()
{
    char ch;
    scanf("%c", &ch);
    char ch1 = 'A';
    int lineN = 1, spaceN1 = 39, spaceN2 = 0;
    while (ch1 < ch)
    {
        spaceN2 = 2 * lineN - 3;
        if (spaceN2 < 0)spaceN2 = 0;
        Print(' ', spaceN1);
        printf("%c", ch1);
        Print(' ', spaceN2);
        if (ch1 > 'A')printf("%c", ch1);
        printf("\n");
        spaceN2++;
        spaceN1--;
        lineN++;
        ch1++;
    }
    Print(' ', spaceN1);
    Print(ch, 2 * lineN - 1);

    return 0;
}

void Print(char ch, int n)
{
    for (int i = 0; i < n; i++)
    {
        printf("%c", ch);
    }
}